<template>
  <div>
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="请选择时间">
              <g-year-picker
                placeholder="请选择学份"
                :is-init="false"
                v-model="queryParam.date"
              ></g-year-picker>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
               <a-button class="Template" type="primary" icon="download" @click="handleExportXlsTemplate('单项荣誉.xlsx')">下载模板</a-button>
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- 查询区域-END -->

    <!-- 操作按钮区域 -->
    <div class="table-operator" v-has="'user:operate'">
      <a-button @click="handleAdd" type="primary" icon="plus" v-has="'user:operate'">新增</a-button>
      <a-button type="primary" icon="download" @click="handleExportXls('单项荣誉')">导出</a-button>
      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
        <a-button type="primary" icon="import">导入</a-button>
      </a-upload>
      <!-- 高级查询区域 -->
      <!--      <a-button v-show="selectedRowKeys.length > 0" v-has="'user:operate'" @click="handlePass" type="primary">审批</a-button>-->
      <a-dropdown v-if="selectedRowKeys.length > 0">
        <a-menu slot="overlay">
          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
        </a-menu>
        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
      </a-dropdown>
    </div>
  </div>
</template>

<script>
export default {
  name: 'QueryDiv'
}
</script>

<style scoped>

</style>